﻿
@{
    Layout = "~/Views/Shared/_LayoutDateUserCorS.cshtml";
}

@section SubMenu1{ 
            <input type="button" value="选择商品" id="LoadProduct" class="btn btn-info" />
       }

    <script type="text/javascript">
        function GetProduct(code) {
            $("#searchProduct").text(code);
        }

        $(document).ready(function () {
            $("#LoadProduct").click(function () {
                var pForm = window.open("/Basic/GetProductCategoryList", null, " height=480,width=640,Left=300px,Top=20px, menubar=no,titlebar=no,scrollbar=yes,toolbar=no, status=no,location=no");
                if (pForm) {
                    window.pForm.focus();
                }
            });

            $(":button").click(function () {
                if ($("#searchProduct").text().length < 1) {
                    alert("请选择商品");
                    return;
                }
                $.get("/Jxc/ReportP", {
                    startDate: $("#StartDate").val(),
                    endDate: $("#EndDate").val(),
                    corsId: $("#CorSId").val(),
                    productCode: $("#searchProduct").text()
                },
                    function (data, status) {
                        if (status == "success") {
                            $("#tableDetail").html(data);
                        }
                        else {
                            alert("远程服务器连接失败");
                        }
                    });
            });
        });
    </script> 